package com.gistone.commis.mapper;

import com.gistone.commis.entity.OvertimeNotify;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface OvertimeNotifyMapper {
    int deleteByPrimaryKey(Integer anId);

    int insert(OvertimeNotify record);

    int insertSelective(OvertimeNotify record);

    OvertimeNotify selectByPrimaryKey(Integer anId);

    int updateByPrimaryKeySelective(OvertimeNotify record);

    int updateByPrimaryKey(OvertimeNotify record);

    @Select("SELECT * FROM tb_overtime_notify WHERE community_id=#{0} and year = #{1} and month = #{2}")
    List<OvertimeNotify> selectByCommunityAndYearAndMonth(int commmunityId, int nowYear, int nowMonth);


    @Select("SELECT * FROM tb_overtime_notify WHERE community_id=#{0} and year = #{1} and month = #{2} and flag = #{3}")
    List<OvertimeNotify> selectByCommunityAndYearAndMonthAndFlag(int commmunityId, int nowYear, int nowMonth, int flag);


}